#include "HSGlobal.h"
#ifdef _DINO_WINDOWS_
#include <windows.h>
#else
#include <dlfcn.h>
#endif

void *OpenLibrary(char *fname){
  #ifdef _DINO_WINDOWS_
  return (void*)LoadLibrary( TEXT(fname) );
  #else
  return dlopen(fname, RTLD_NOW | RTLD_LOCAL | RTLD_DEEPBIND );
  #endif
}

void *GetLibraryFuncByName(void *handle,char *fname){
  #ifdef _DINO_WINDOWS_
  return (void*)GetProcAddress((HMODULE)handle,fname);
  #else
  return dlsym(handle,fname);
  #endif
}
